import React from 'react'
import PureRenderMixin from 'react-addons-pure-render-mixin'
import Item from './Item'

import './style.less';

class OrderList extends React.Component {
    constructor(props, context) {
        super(props, context);
        this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
    }
    render() {
        const { data,submitComment }=this.props;
        return (
           <div>
               {
                   data.map((item,index)=>{
                       return <Item data={item} key={index} submitComment={submitComment}></Item>
                   })
               }
           </div>
        )
    }
}

// 使用 require.ensure 异步加载，还不支持 ES6 的 export
export default OrderList